﻿using System;
class LastDigitWord
{
    static int InputNumber()
    {
        while (true)
        {
            try
            {
                int number = int.Parse(Console.ReadLine());
                return number;
            }
            catch (Exception)
            {
                Console.Write("Please re-enter number: ");
            }
        }
    }
    static string LastDigit(int number)
    {
        int digit = number % 10;
        switch (digit)
        {
            case 0:
                {
                    return "zero";
                }
            case 1:
                {
                    return "one";
                }
            case 2:
                {
                    return "two";
                }
            case 3:
                {
                    return "three";
                }
            case 4:
                {
                    return "four";
                }
            case 5:
                {
                    return "five";
                }
            case 6:
                {
                    return "six";
                }
            case 7:
                {
                    return "seven";
                }
            case 8:
                {
                    return "eight";
                }
            case 9:
                {
                    return "nine";
                }
            default:
                {
                    return "impossible";
                }
        }
    }
    static void Main()
    {
        int theNumber = 0;
        string digit;
        Console.Write("Please enter number: ");
        theNumber = InputNumber();
        digit = LastDigit(theNumber);
        Console.Write("The name of the last digit, is: ");
        Console.WriteLine(digit);
        Console.ReadLine();
    }
}

